Carbon


TransitionWindow

Header: MacWindows.h Carbon status: Supported

Displays an animation and plays the theme-appropriate sound for a window when it is shown or hidden.

OSStatus TransitionWindow (
    WindowRef window, 
    WindowTransitionEffect effect, 
    WindowTransitionAction action, 
    const Rect *rect
);
Parameter descriptions
window

A pointer to the window that is being shown or hidden.

effect

A constant specifying the window transition effect to be performed. With the Mac OS 8.5 Window Manager, the only valid constant is kWindowZoomTransitionEffect; see “Window Transition Effect Constant” for a description of this value.

action

A constant specifying the window transition action to be performed; valid constants are kWindowShowTransitionAction and kWindowHideTransitionAction. See “Window Transition Action Constants” for descriptions of these values.

rect

If you pass kWindowShowTransitionAction in the action parameter then, before calling TransitionWindow, set the rectangle to specify the dimensions and position, in global coordinates, of the area from which the zoom is to start. If you pass NULL, TransitionWindow uses the center of the display screen as the source rectangle.

If you pass kWindowHideTransitionAction in the action parameter then, before calling TransitionWindow, set the rectangle to specify the dimensions and position, in global coordinates, of the area at which the zoom is to end.

If you pass NULL, TransitionWindow uses the center of the display screen as the destination rectangle.

function result

A result code.

DISCUSSION

The TransitionWindow function displays an animation of a window’s transition between the open and closed states, such as that displayed by the Finder. TransitionWindow uses the rectangle specified in the rect parameter for one end of the animation (the source or the destination of the zoom, depending upon whether the window is being shown or hidden, respectively) and the window’s current size and position for the other end of the animation. TransitionWindow also plays sounds appropriate to the current theme for the opening and closing actions.

Your application may use TransitionWindow instead of the functions ShowWindow and HideWindow. Like these pre–Mac OS 8.5 Window Manager functions, TransitionWindow generates the appropriate update and active events when it shows and hides windows.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.5 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)